home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2002 #4 / K-CD-4-2002.ISO / Empire Earth / EEDemo.exe / Disk1 / data.ssa / unit ai scripts_prophet.tai < prev    next >
Encoding:
Text File  |  2001-09-29  |  1.5 KB  |  93 lines

  1. //
  2. // Prophet unit AI file
  3. //
  4. // Behaviors:
  5. //
  6. //        At players request, cast calamities.
  7. //
  8. //    Notes:
  9. //
  10. //    Known Problems:
  11. //
  12.  
  13. Idle
  14. {
  15.     AmIUnderAttack    true(UnderAttack)
  16. }
  17.  
  18. UnderAttack
  19. {
  20.     CanFlee        true(RunFromAttacker)
  21.     AlwaysTrue    true(ReacquireGoal)
  22. }
  23.  
  24. RunFromAttacker
  25. {
  26.     AlwaysTrue true(PrepareToMove)
  27. }
  28.  
  29. FaceEnemyUnit
  30. {
  31.     EnemyUnitDestroyed true(Idle)
  32.     allof(GoalIsCalamity,FacingEnemyUnit) true(CalamityPreCast)
  33. }
  34.  
  35. CalamityPreCast
  36. {
  37.     CalamityTargetStillValid true(CastCalamity) false(Idle)
  38. }
  39.  
  40. // just for old saved games
  41. PrepareToCastCalamity
  42. {
  43.     AlwaysTrue true(CastCalamity)
  44. }
  45.  
  46. ReacquireGoal
  47. {
  48.     EnemyUnitDestroyed true(Idle)
  49.     allof(GoalIsCalamity,UnitInWeaponRange) true(CalamityPreCast)
  50.     GoalIsCalamity true(PrepareToMove) 
  51. }
  52.  
  53. CastCalamity
  54. {
  55.     allof(OwnerIsHuman,OneAndAHalfSecondsElapsed) true(Idle)
  56.     allof(OwnerIsComputer,OneAndAHalfSecondsElapsed) true(PostCalamityFlee)
  57. }
  58.  
  59. PrepareToMove
  60. {
  61.     allof(GoalIsCalamity,UnitInWeaponRange) true(FaceEnemyUnit)
  62. }
  63.  
  64. GetNextMoveWaypoint
  65. {
  66.     EnemyUnitDestroyed true(Idle)
  67.     allof(GoalIsCalamity,NextWaypointRetrieved,UnitInWeaponRange) true(FaceEnemyUnit)
  68. }
  69.  
  70. PostCalamityFlee
  71. {
  72.     AlwaysTrue true(Idle)
  73. }
  74.  
  75. #include("Generic Movement.tai")
  76.  
  77. GetNextMoveWaypoint
  78. {
  79.     NextWaypointRetrieved true(Advance) false(TurnToUnitFacing)
  80. }
  81.  
  82. Advance
  83. {
  84.     allof(OneWaypointRemaining,GoalIsUnit) true(TurnToUnitFacing)
  85. }
  86.  
  87. #include("Generic Death.tai")
  88.  
  89. // if we can't reacquire a goal, go idle as a failsafe.
  90. ReacquireGoal
  91. {
  92.     AlwaysTrue    true(Idle)
  93. }